<%@ page language="java" contentType="text/html; charset=gb2312"
    pageEncoding="gb2312"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>Insert title here</title>
</head>
<body>
<% String num1=request.getParameter("num1");
String num2=request.getParameter("num2");
String oper=request.getParameter("operator");
double re=0;
double dou_num1=Double.parseDouble(num1);
double dou_num2=Double.parseDouble(num2);
if(oper.equals("+")){
	re=dou_num1+dou_num2;
}else if(oper.equals("-")){
	re=dou_num1-dou_num2;
}else if(oper.equals("*")){
	re=dou_num1*dou_num2;
}else if(oper.equals("/")){
	re=dou_num1/dou_num2;
}
out.println(re);

%>
</body>
</html>